* Clean up
clear all

/* Set working directory: please set your own
cd "~/Dropbox/JOP third submission/JOP replication/"
*/

* Open dataset

use 01_data/cis_data.dta, clear

* Generate interaction
gen cabine_use_pp_dummy = cabine_use * pp_dummy

* A fake model to start the dataset
regr cabine_use CCAA
regsave CCAA using 01_data/survey_ccaa_jk_2.dta, ci level(95) replace addlabel ///
(Removed, fake, Model, fake, Controls, fake)

forvalues x = 1/19{
	regr uncomfortable cabine_use pp_dummy cabine_use_pp_dummy female i.income age age_sq i.education i.TAMUNI i.CCAA if CCAA != `x', r
	regsave cabine_use_pp_dummy using 01_data/survey_ccaa_jk_2.dta, ci level(95) append addlabel ///
(Removed, `x', Model, uncomfortable, Controls, With controls)

	regr uncomfortable cabine_use pp_dummy cabine_use_pp_dummy if CCAA != `x', r
	regsave cabine_use_pp_dummy using 01_data/survey_ccaa_jk_2.dta, ci level(95) append addlabel ///
(Removed, `x', Model, uncomfortable, Controls, Without controls)

}
